<template>
  <el-dialog
    title="Tips"
    width="30%"
    :before-close="handleClose"
    v-model="props.dialogVisible"
  >
    <span>是否删除</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="confirm"> 确认 </el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup>
import { ref, defineProps, toRefs, defineEmits } from "vue";
import { ElMessageBox } from "element-plus";

const props = defineProps({
  dialogVisible: Boolean,
});
let { dialogVisible } = toRefs(props);
const emits = defineEmits(["closeTan", "confirm"]);
const close = () => {
  dialogVisible = false;
  emits("closeTan", dialogVisible);
};
const confirm = () => {
  dialogVisible = false;
  emits("confirm", dialogVisible);
};
const handleClose = (done) => {};
</script>
<style scoped>
.dialog-footer button:first-child {
  margin-right: 10px;
}
</style>
